package com.xfcy.blog.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 评论表(Comment)表实体类
 *
 * @author 晓风残月Lx
 * @since 2023-04-09 11:03:05
 */
@TableName("b_comment")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment implements Serializable {
    // ID
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    // 评论人ID
    private Integer userId;
    // 文章id
    private Long articleId;
    // 内容
    private String content;
    // 评论点赞量
    private Integer likeCount;
    // 回复人id
    private Integer replyUserId;
    // 父id
    private Integer parentId;
    // 逻辑删除
    @TableLogic(value = "0",delval = "1")
    private Integer isDeleted;
    // 评论时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    // 评论更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}

